NASM=nasm
OBJ=boot.bin

$(OBJ):boot.asm
	$(NASM) $< -o $(OBJ)

LOADER.BIN:loader.asm
	$(NASM) $< -o LOADER.BIN

disk:$(OBJ)
	dd if=./boot.bin of=./boot.img seek=0 bs=512 count=1
	dd if=/dev/zero of=boot.img skip=1 seek=1 bs=512 count=2789

copy:boot.img LOADER.BIN
	mkdir -p /tmp/floppy;\
	mount -o loop boot.img /tmp/floppy/ -o fat=12;\
	cp LOADER.BIN /tmp/floppy/;\
	umount /tmp/floppy/;\
	rm -rf /tmp/floppy/;

clean:
	rm -f *.bin core

cleanall:clean
	rm -f $(OBJ)

